#pragma once
#include "IPAddress.h"
#include "SocketAddress.h"

namespace yzrilyzr_net{
	ECLASS(InetSocketAddress, public SocketAddress){
	private:
	std::shared_ptr<IPAddress> ipaddr=nullptr;
	uint16_t port;
	public:
	InetSocketAddress(std::shared_ptr<IPAddress> addr, uint16_t port) :ipaddr(addr), port(port){}
	InetSocketAddress(yzrilyzr_lang::String hostname, uint16_t port) :port(port){}
	uint16_t getPort(){
		return port;
	}
	std::shared_ptr<IPAddress> getAddress(){
		return ipaddr;
	}
	};
}